package pierwszy;

import org.openqa.selenium.NoSuchWindowException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.WebDriverWait;


public class KsDPage extends KsPDKPage{
	private WebDriver driver;
	private WebDriverWait wait;
	
	KsDPage(WebDriver driver, WebDriverWait wait){
		super(driver, wait);
		this.driver = driver;
		this.wait = wait;
		
		if(!driver.getTitle().equals("Centrum Ksiegowości i Edukacji Finansowej - panel administratora")){
			throw new NoSuchWindowException("This is not the KsDotacje page");
		}
		
		if(!getPortalTypeText().getText().equals(KsPDKPage.siteTypeMap.get("Dotacje"))){
			throw new NoSuchWindowException("This is not the Note page");
			//System.out.println("Duuupa KsDPage");
		}
	}
}
